home *** CD-ROM | disk | FTP | other *** search
/ Champak 50 / Volume 50 - JOGO DISK .iso / Games / maya_miguel_global_groovin.swf / scripts / frame_11 / DoAction.as
Text File  |  2007-09-27  |  20KB  |  753 lines

  1. function BeforeDrag(whichMC)
  2. {
  3.    var _loc1_ = whichMC;
  4.    var _loc2_ = _root;
  5.    if(!_loc2_.GameStarted)
  6.    {
  7.       _loc2_.imdragging = true;
  8.       _loc2_.whatimdragging = _loc1_;
  9.       _loc2_.SwapLayerSymbol.swapDepths(_loc1_);
  10.       _loc2_.Item1currentx = _loc1_._x;
  11.       _loc2_.Item1currenty = _loc1_._y;
  12.       _loc1_.gotoAndStop("drag");
  13.       startDrag(_loc1_,1);
  14.    }
  15. }
  16. function AfterDrag(whichMC)
  17. {
  18.    var _loc1_ = whichMC;
  19.    var _loc2_ = _root;
  20.    _loc2_.imdragging = false;
  21.    _loc2_.whatimdragging = null;
  22.    if(!_loc2_.GameStarted)
  23.    {
  24.       stopDrag();
  25.       _loc1_.swapDepths(_loc2_.SwapLayerSymbol);
  26.       if(_loc1_._droptarget eq "/soundtrack1/snaplocation1" and _loc2_.CheckAllCollision(_loc1_,1) == 0)
  27.       {
  28.          _loc1_._y = _loc2_.soundtrack1.snapposition1._y + _loc2_.yoffset1;
  29.          _loc2_.Item1currentx = _loc1_._x;
  30.          _loc2_.Item1currenty = _loc1_._y;
  31.          _loc1_.gotoAndStop("on");
  32.       }
  33.       else if(_loc1_._droptarget eq "/soundtrack2/snaplocation1" and _loc2_.CheckAllCollision(_loc1_,2) == 0)
  34.       {
  35.          _loc1_._y = _loc2_.soundtrack2.snapposition1._y + _loc2_.yoffset2;
  36.          _loc2_.Item1currentx = _loc1_._x;
  37.          _loc2_.Item1currenty = _loc1_._y;
  38.          _loc1_.gotoAndStop("on");
  39.       }
  40.       else if(_loc1_._droptarget eq "/soundtrack3/snaplocation1" and _loc2_.CheckAllCollision(_loc1_,3) == 0)
  41.       {
  42.          _loc1_._y = _loc2_.soundtrack3.snapposition1._y + _loc2_.yoffset3;
  43.          _loc2_.Item1currentx = _loc1_._x;
  44.          _loc2_.Item1currenty = _loc1_._y;
  45.          _loc1_.gotoAndStop("on");
  46.       }
  47.       else if(_loc2_.Item1currenty > _loc2_.ybaseline and _loc1_._y < _loc2_.ybaseline)
  48.       {
  49.          _loc1_.gotoAndStop("off");
  50.          if(_loc1_._name.indexOf("sound1") == 0)
  51.          {
  52.             _loc1_._x = _loc2_.s1x;
  53.             _loc1_._y = _loc2_.s1y;
  54.          }
  55.          if(_loc1_._name.indexOf("sound2") == 0)
  56.          {
  57.             _loc1_._x = _loc2_.s2x;
  58.             _loc1_._y = _loc2_.s2y;
  59.          }
  60.          if(_loc1_._name.indexOf("sound3") == 0)
  61.          {
  62.             _loc1_._x = _loc2_.s3x;
  63.             _loc1_._y = _loc2_.s3y;
  64.          }
  65.          if(_loc1_._name.indexOf("sound4") == 0)
  66.          {
  67.             _loc1_._x = _loc2_.s4x;
  68.             _loc1_._y = _loc2_.s4y;
  69.          }
  70.          if(_loc1_._name.indexOf("sound5") == 0)
  71.          {
  72.             _loc1_._x = _loc2_.s5x;
  73.             _loc1_._y = _loc2_.s5y;
  74.          }
  75.          if(_loc1_._name.indexOf("sound6") == 0)
  76.          {
  77.             _loc1_._x = _loc2_.s6x;
  78.             _loc1_._y = _loc2_.s6y;
  79.          }
  80.          if(_loc1_._name.indexOf("sound7") == 0)
  81.          {
  82.             _loc1_._x = _loc2_.s7x;
  83.             _loc1_._y = _loc2_.s7y;
  84.          }
  85.          if(_loc1_._name.indexOf("sound8") == 0)
  86.          {
  87.             _loc1_._x = _loc2_.s8x;
  88.             _loc1_._y = _loc2_.s8y;
  89.          }
  90.          if(_loc1_._name.indexOf("sound9") == 0)
  91.          {
  92.             _loc1_._x = _loc2_.s9x;
  93.             _loc1_._y = _loc2_.s9y;
  94.          }
  95.          if(_loc1_._name.indexOf("beat1") == 0)
  96.          {
  97.             _loc1_._x = _loc2_.b1x;
  98.             _loc1_._y = _loc2_.b1y;
  99.          }
  100.          if(_loc1_._name.indexOf("beat2") == 0)
  101.          {
  102.             _loc1_._x = _loc2_.b2x;
  103.             _loc1_._y = _loc2_.b2y;
  104.          }
  105.          if(_loc1_._name.indexOf("beat3") == 0)
  106.          {
  107.             _loc1_._x = _loc2_.b3x;
  108.             _loc1_._y = _loc2_.b3y;
  109.          }
  110.          if(_loc1_._name.indexOf("beat4") == 0)
  111.          {
  112.             _loc1_._x = _loc2_.b4x;
  113.             _loc1_._y = _loc2_.b4y;
  114.          }
  115.          if(_loc1_._name.indexOf("xstop") == 0)
  116.          {
  117.             _loc1_._x = _loc2_.xstopx;
  118.             _loc1_._y = _loc2_.xstopy;
  119.          }
  120.          if(_loc1_._name eq soundtrack1current + "_" + soundtrack1index)
  121.          {
  122.             _loc2_.TerminateThisSound2(_loc2_.soundtrack1current,_loc2_.soundtrack1index,1);
  123.             _loc2_.soundtrack1current = "";
  124.             _loc2_.soundtrack1index = 0;
  125.             _loc2_.soundtrack1playing = false;
  126.          }
  127.          if(_loc1_._name eq soundtrack2current + "_" + soundtrack2index)
  128.          {
  129.             _loc2_.TerminateThisSound2(_loc2_.soundtrack2current,_loc2_.soundtrack2index,2);
  130.             _loc2_.soundtrack2current = "";
  131.             _loc2_.soundtrack2index = 0;
  132.             _loc2_.soundtrack2playing = false;
  133.          }
  134.          if(_loc1_._name eq soundtrack3current + "_" + soundtrack3index)
  135.          {
  136.             _loc2_.TerminateThisSound2(_loc2_.soundtrack3current,_loc2_.soundtrack3index,3);
  137.             _loc2_.soundtrack3current = "";
  138.             _loc2_.soundtrack3index = 0;
  139.             _loc2_.soundtrack3playing = false;
  140.          }
  141.       }
  142.       else
  143.       {
  144.          _loc1_._x = _loc2_.Item1currentx;
  145.          _loc1_._y = _loc2_.Item1currenty;
  146.          if(_loc1_._y <= _loc2_.ybaseline)
  147.          {
  148.             _loc1_.gotoAndStop("off");
  149.          }
  150.          else
  151.          {
  152.             _loc1_.gotoAndStop("on");
  153.          }
  154.       }
  155.    }
  156. }
  157. function DetectCollision(whichMC, whichSoundByte)
  158. {
  159.    var result = 0;
  160.    i = 1;
  161.    while(i <= _root.ButtonCount)
  162.    {
  163.       temp = whichMC.hitTest(eval("_root." + whichSoundByte + "_" + i));
  164.       if(temp)
  165.       {
  166.          return i;
  167.       }
  168.       i++;
  169.    }
  170.    return result;
  171. }
  172. function DetectCollisionTwo(whichMC, whichSoundByte)
  173. {
  174.    var result = 0;
  175.    i = 1;
  176.    while(i <= _root.ButtonCount)
  177.    {
  178.       if(whichMC._name ne whichSoundByte + "_" + i)
  179.       {
  180.          temp = whichMC.hitTest(eval("_root." + whichSoundByte + "_" + i));
  181.          if(temp)
  182.          {
  183.             result = i;
  184.          }
  185.       }
  186.       i++;
  187.    }
  188.    return result;
  189. }
  190. function CheckAllCollision(whichMC, whichTrack)
  191. {
  192.    var result = 0;
  193.    var temp;
  194.    var i;
  195.    i = 1;
  196.    while(i <= _root.TotalSounds)
  197.    {
  198.       temp1 = "sound" + i;
  199.       temp = _root.DetectCollisionTwo(whichMC,temp1);
  200.       if(temp > 0 and whichMC._name ne temp1 + "_" + temp)
  201.       {
  202.          result += 1;
  203.       }
  204.       i++;
  205.    }
  206.    i = 1;
  207.    while(i <= _root.TotalBeats)
  208.    {
  209.       temp1 = "beat" + i;
  210.       temp = _root.DetectCollisionTwo(whichMC,temp1);
  211.       if(temp > 0 and whichMC._name ne temp1 + "_" + temp)
  212.       {
  213.          result += 1;
  214.       }
  215.       i++;
  216.    }
  217.    temp1 = "xstop";
  218.    temp = _root.DetectCollisionTwo(whichMC,temp1);
  219.    if(temp > 0 and whichMC._name ne temp1 + "_" + temp)
  220.    {
  221.       result += 1;
  222.    }
  223.    temp1 = "soundtrack" + whichTrack + ".endpoint";
  224.    if(whichMC.hitTest(eval(temp1)) > 0)
  225.    {
  226.       result += 1;
  227.    }
  228.    temp1 = "soundtrack" + whichTrack + ".startpoint";
  229.    if(whichMC.hitTest(eval(temp1)) > 0)
  230.    {
  231.       result += 1;
  232.    }
  233.    return result;
  234. }
  235. function TerminateThisSound(whichSound, whichInstance, whichTrack)
  236. {
  237.    _root.turnSoundClipOff(whichSound,whichTrack);
  238.    tellTarget("_root." + whichSound + "_" + whichInstance)
  239.    {
  240.       gotoAndStop("on");
  241.       amiplaying = false;
  242.    }
  243. }
  244. function TerminateThisSound2(whichSound, whichInstance, whichTrack)
  245. {
  246.    _root.turnSoundClipOff(whichSound,whichTrack);
  247.    tellTarget("_root." + whichSound + "_" + whichInstance)
  248.    {
  249.       gotoAndStop("off");
  250.       amiplaying = false;
  251.    }
  252. }
  253. function StopThisSound(whichSound, whichInstance)
  254. {
  255.    _root.turnSoundClipOff(whichSound,whichTrack);
  256.    tellTarget("_root." + whichSound + "_" + whichInstance)
  257.    {
  258.       stop();
  259.    }
  260. }
  261. function StartThisSound(whichSound, whichInstance, offSet, whichTrack)
  262. {
  263.    _root.turnSoundClipOn(whichSound,whichInstance,offSet,whichTrack);
  264.    tellTarget("_root." + whichSound + "_" + whichInstance)
  265.    {
  266.       amiplaying = true;
  267.       play();
  268.    }
  269. }
  270. function SoundTest(whichTrack, whichPlayHead, whichSound)
  271. {
  272.    var result = false;
  273.    collisionItem = _root.DetectCollision(whichPlayHead,whichSound);
  274.    if(collisionItem gt 0)
  275.    {
  276.       switch(whichTrack)
  277.       {
  278.          case 1:
  279.             if(eval("_root." + _root.soundtrack1current + "_" + _root.soundtrack1index + ".iloop") and _root.soundtrack1current != whichSound)
  280.             {
  281.                _root.TerminateThisSound(_root.soundtrack1current,_root.soundtrack1index,whichTrack);
  282.                _root.soundtrack1current = whichSound;
  283.                _root.soundtrack1index = collisionItem;
  284.                _root.soundtrack1playing = false;
  285.             }
  286.             break;
  287.          case 2:
  288.             if(eval("_root." + _root.soundtrack2current + "_" + _root.soundtrack2index + ".iloop") and _root.soundtrack2current != whichSound)
  289.             {
  290.                _root.TerminateThisSound(_root.soundtrack2current,_root.soundtrack2index,whichTrack);
  291.                _root.soundtrack2current = whichSound;
  292.                _root.soundtrack2index = collisionItem;
  293.                _root.soundtrack2playing = false;
  294.             }
  295.             break;
  296.          case 3:
  297.             if(eval("_root." + _root.soundtrack3current + "_" + _root.soundtrack3index + ".iloop") and _root.soundtrack3current != whichSound)
  298.             {
  299.                _root.TerminateThisSound(_root.soundtrack3current,_root.soundtrack3index,whichTrack);
  300.                _root.soundtrack3current = whichSound;
  301.                _root.soundtrack3index = collisionItem;
  302.                _root.soundtrack3playing = false;
  303.             }
  304.       }
  305.       result = true;
  306.       if(!eval("_root.soundtrack" + whichTrack + "playing"))
  307.       {
  308.          switch(whichTrack)
  309.          {
  310.             case 1:
  311.                _root.soundtrack1playing = true;
  312.                _root.soundtrack1index = collisionItem;
  313.                _root.soundtrack1current = whichSound;
  314.                break;
  315.             case 2:
  316.                _root.soundtrack2playing = true;
  317.                _root.soundtrack2index = collisionItem;
  318.                _root.soundtrack2current = whichSound;
  319.                break;
  320.             case 3:
  321.                _root.soundtrack3playing = true;
  322.                _root.soundtrack3index = collisionItem;
  323.                _root.soundtrack3current = whichSound;
  324.          }
  325.          _root.StartThisSound(whichSound,collisionItem,0,whichTrack);
  326.       }
  327.    }
  328.    else
  329.    {
  330.       result = false;
  331.    }
  332.    return result;
  333. }
  334. function SwitchLanguage(whichLanguage, whichAudio)
  335. {
  336.    var temp;
  337.    if(whichLanguage eq "english")
  338.    {
  339.       temp = "off";
  340.    }
  341.    else
  342.    {
  343.       temp = "espanol";
  344.    }
  345.    i = 1;
  346.    while(i <= _root.ButtonCount)
  347.    {
  348.       if(eval("_root." + whichAudio + "_" + i + "._y") < _root.ybaseline)
  349.       {
  350.          tellTarget("_root." + whichAudio + "_" + i)
  351.          {
  352.             gotoAndStop(temp);
  353.          }
  354.       }
  355.       i++;
  356.    }
  357. }
  358. function ChangeLanguage(whichLanguage)
  359. {
  360.    var _loc1_ = _root;
  361.    var _loc2_ = whichLanguage;
  362.    _loc1_.SwitchLanguage(_loc2_,"sound1");
  363.    _loc1_.SwitchLanguage(_loc2_,"sound2");
  364.    _loc1_.SwitchLanguage(_loc2_,"sound3");
  365.    _loc1_.SwitchLanguage(_loc2_,"sound4");
  366.    _loc1_.SwitchLanguage(_loc2_,"sound5");
  367.    _loc1_.SwitchLanguage(_loc2_,"sound6");
  368.    _loc1_.SwitchLanguage(_loc2_,"sound7");
  369.    _loc1_.SwitchLanguage(_loc2_,"sound8");
  370.    _loc1_.SwitchLanguage(_loc2_,"sound9");
  371.    _loc1_.SwitchLanguage(_loc2_,"beat1");
  372.    _loc1_.SwitchLanguage(_loc2_,"beat2");
  373.    _loc1_.SwitchLanguage(_loc2_,"beat3");
  374.    _loc1_.SwitchLanguage(_loc2_,"beat4");
  375.    _loc1_.SwitchLanguage(_loc2_,"xstop");
  376.    _loc1_.dynamictext.gotoAndStop(_loc2_);
  377. }
  378. function RecordStartingLocation()
  379. {
  380.    var _loc1_ = _root;
  381.    _loc1_.s1x = _loc1_.sound1_1._x;
  382.    _loc1_.s1y = _loc1_.sound1_1._y;
  383.    _loc1_.s2x = _loc1_.sound2_1._x;
  384.    _loc1_.s2y = _loc1_.sound2_1._y;
  385.    _loc1_.s3x = _loc1_.sound3_1._x;
  386.    _loc1_.s3y = _loc1_.sound3_1._y;
  387.    _loc1_.s4x = _loc1_.sound4_1._x;
  388.    _loc1_.s4y = _loc1_.sound4_1._y;
  389.    _loc1_.s5x = _loc1_.sound5_1._x;
  390.    _loc1_.s5y = _loc1_.sound5_1._y;
  391.    _loc1_.s6x = _loc1_.sound6_1._x;
  392.    _loc1_.s6y = _loc1_.sound6_1._y;
  393.    _loc1_.s7x = _loc1_.sound7_1._x;
  394.    _loc1_.s7y = _loc1_.sound7_1._y;
  395.    _loc1_.s8x = _loc1_.sound8_1._x;
  396.    _loc1_.s8y = _loc1_.sound8_1._y;
  397.    _loc1_.s9x = _loc1_.sound9_1._x;
  398.    _loc1_.s9y = _loc1_.sound9_1._y;
  399.    _loc1_.b1x = _loc1_.beat1_1._x;
  400.    _loc1_.b1y = _loc1_.beat1_1._y;
  401.    _loc1_.b2x = _loc1_.beat2_1._x;
  402.    _loc1_.b2y = _loc1_.beat2_1._y;
  403.    _loc1_.b3x = _loc1_.beat3_1._x;
  404.    _loc1_.b3y = _loc1_.beat3_1._y;
  405.    _loc1_.b4x = _loc1_.beat4_1._x;
  406.    _loc1_.b4y = _loc1_.beat4_1._y;
  407.    _loc1_.xstopx = _loc1_.xstop_1._x;
  408.    _loc1_.xstopy = _loc1_.xstop_1._y;
  409. }
  410. function turnOffDemoSound()
  411. {
  412.    var _loc1_ = _root;
  413.    if(_loc1_.demosound eq "sound1demo")
  414.    {
  415.       _loc1_.sound1clip.stop();
  416.    }
  417.    if(_loc1_.demosound eq "sound2demo")
  418.    {
  419.       _loc1_.sound2clip.stop();
  420.    }
  421.    if(_loc1_.demosound eq "sound3demo")
  422.    {
  423.       _loc1_.sound3clip.stop();
  424.    }
  425.    if(_loc1_.demosound eq "sound4demo")
  426.    {
  427.       _loc1_.sound4clip.stop();
  428.    }
  429.    if(_loc1_.demosound eq "sound5demo")
  430.    {
  431.       _loc1_.sound5clip_1.stop();
  432.    }
  433.    if(_loc1_.demosound eq "sound6demo")
  434.    {
  435.       _loc1_.sound6clip_1.stop();
  436.    }
  437.    if(_loc1_.demosound eq "sound7demo")
  438.    {
  439.       _loc1_.sound7clip_1.stop();
  440.    }
  441.    if(_loc1_.demosound eq "sound8demo")
  442.    {
  443.       _loc1_.sound8clip.stop();
  444.    }
  445.    if(_loc1_.demosound eq "sound9demo")
  446.    {
  447.       _loc1_.sound9clip_1.stop();
  448.    }
  449.    if(_loc1_.demosound eq "beat1demo")
  450.    {
  451.       _loc1_.beat1clip_1.stop();
  452.    }
  453.    if(_loc1_.demosound eq "beat2demo")
  454.    {
  455.       _loc1_.beat2clip_1.stop();
  456.    }
  457.    if(_loc1_.demosound eq "beat3demo")
  458.    {
  459.       _loc1_.beat3clip_1.stop();
  460.    }
  461.    if(_loc1_.demosound eq "beat4demo")
  462.    {
  463.       _loc1_.beat4clip_1.stop();
  464.    }
  465. }
  466. function turnSoundClipOn(whichSound, whichInstance, Offset, whichTrack)
  467. {
  468.    var _loc1_ = _root;
  469.    var _loc2_ = Offset;
  470.    var _loc3_ = whichSound;
  471.    if(_loc3_ eq "sound1")
  472.    {
  473.       _loc1_.sound1clip.start(_loc2_);
  474.    }
  475.    if(_loc3_ eq "sound2")
  476.    {
  477.       _loc1_.sound2clip.start(_loc2_);
  478.    }
  479.    if(_loc3_ eq "sound3")
  480.    {
  481.       _loc1_.sound3clip.start(_loc2_);
  482.    }
  483.    if(_loc3_ eq "sound4")
  484.    {
  485.       _loc1_.sound4clip.start(_loc2_);
  486.    }
  487.    if(_loc3_ eq "sound5")
  488.    {
  489.       switch(whichTrack)
  490.       {
  491.          case 1:
  492.             _loc1_.sound5clip_1.start(_loc2_,20);
  493.             break;
  494.          case 2:
  495.             _loc1_.sound5clip_2.start(_loc2_,20);
  496.             break;
  497.          case 3:
  498.             _loc1_.sound5clip_3.start(_loc2_,20);
  499.       }
  500.    }
  501.    if(_loc3_ eq "sound6")
  502.    {
  503.       switch(whichTrack)
  504.       {
  505.          case 1:
  506.             _loc1_.sound6clip_1.start(_loc2_,20);
  507.             break;
  508.          case 2:
  509.             _loc1_.sound6clip_2.start(_loc2_,20);
  510.             break;
  511.          case 3:
  512.             _loc1_.sound6clip_3.start(_loc2_,20);
  513.       }
  514.    }
  515.    if(_loc3_ eq "sound7")
  516.    {
  517.       switch(whichTrack)
  518.       {
  519.          case 1:
  520.             _loc1_.sound7clip_1.start(_loc2_,20);
  521.             break;
  522.          case 2:
  523.             _loc1_.sound7clip_2.start(_loc2_,20);
  524.             break;
  525.          case 3:
  526.             _loc1_.sound7clip_3.start(_loc2_,20);
  527.       }
  528.    }
  529.    if(_loc3_ eq "sound8")
  530.    {
  531.       _loc1_.sound8clip.start(_loc2_);
  532.    }
  533.    if(_loc3_ eq "sound9")
  534.    {
  535.       switch(whichTrack)
  536.       {
  537.          case 1:
  538.             _loc1_.sound9clip_1.start(_loc2_,20);
  539.             break;
  540.          case 2:
  541.             _loc1_.sound9clip_2.start(_loc2_,20);
  542.             break;
  543.          case 3:
  544.             _loc1_.sound9clip_3.start(_loc2_,20);
  545.       }
  546.    }
  547.    if(_loc3_ eq "beat1")
  548.    {
  549.       switch(whichTrack)
  550.       {
  551.          case 1:
  552.             _loc1_.beat1clip_1.start(_loc2_,20);
  553.             break;
  554.          case 2:
  555.             _loc1_.beat1clip_2.start(_loc2_,20);
  556.             break;
  557.          case 3:
  558.             _loc1_.beat1clip_3.start(_loc2_,20);
  559.       }
  560.    }
  561.    if(_loc3_ eq "beat2")
  562.    {
  563.       switch(whichTrack)
  564.       {
  565.          case 1:
  566.             _loc1_.beat2clip_1.start(_loc2_,20);
  567.             break;
  568.          case 2:
  569.             _loc1_.beat2clip_2.start(_loc2_,20);
  570.             break;
  571.          case 3:
  572.             _loc1_.beat2clip_3.start(_loc2_,20);
  573.       }
  574.    }
  575.    if(_loc3_ eq "beat3")
  576.    {
  577.       switch(whichTrack)
  578.       {
  579.          case 1:
  580.             _loc1_.beat3clip_1.start(_loc2_,20);
  581.             break;
  582.          case 2:
  583.             _loc1_.beat3clip_2.start(_loc2_,20);
  584.             break;
  585.          case 3:
  586.             _loc1_.beat3clip_3.start(_loc2_,20);
  587.       }
  588.    }
  589.    if(_loc3_ eq "beat4")
  590.    {
  591.       switch(whichTrack)
  592.       {
  593.          case 1:
  594.             _loc1_.beat4clip_1.start(_loc2_,20);
  595.             break;
  596.          case 2:
  597.             _loc1_.beat4clip_2.start(_loc2_,20);
  598.             break;
  599.          case 3:
  600.             _loc1_.beat4clip_3.start(_loc2_,20);
  601.       }
  602.    }
  603. }
  604. function turnSoundClipOff(whichSound, whichTrack)
  605. {
  606.    var _loc1_ = _root;
  607.    var _loc2_ = whichSound;
  608.    var _loc3_ = whichTrack;
  609.    if(_loc2_ eq "sound1")
  610.    {
  611.       _loc1_.sound1clip.stop("elephant");
  612.    }
  613.    if(_loc2_ eq "sound2")
  614.    {
  615.       _loc1_.sound2clip.stop("train");
  616.    }
  617.    if(_loc2_ eq "sound3")
  618.    {
  619.       _loc1_.sound3clip.stop("tincan");
  620.    }
  621.    if(_loc2_ eq "sound4")
  622.    {
  623.       _loc1_.sound4clip.stop("water");
  624.    }
  625.    if(_loc2_ eq "sound5")
  626.    {
  627.       switch(_loc3_)
  628.       {
  629.          case 1:
  630.             _loc1_.sound5clip_1.stop("xylo");
  631.             break;
  632.          case 2:
  633.             _loc1_.sound5clip_2.stop("xylo");
  634.             break;
  635.          case 3:
  636.             _loc1_.sound5clip_3.stop("xylo");
  637.       }
  638.    }
  639.    if(_loc2_ eq "sound6")
  640.    {
  641.       switch(_loc3_)
  642.       {
  643.          case 1:
  644.             _loc1_.sound6clip_1.stop("bouzouki");
  645.             break;
  646.          case 2:
  647.             _loc1_.sound6clip_2.stop("bouzouki");
  648.             break;
  649.          case 3:
  650.             _loc1_.sound6clip_3.stop("bouzouki");
  651.       }
  652.    }
  653.    if(_loc2_ eq "sound7")
  654.    {
  655.       switch(_loc3_)
  656.       {
  657.          case 1:
  658.             _loc1_.sound7clip_1.stop("bagpipes");
  659.             break;
  660.          case 2:
  661.             _loc1_.sound7clip_2.stop("bagpipes");
  662.             break;
  663.          case 3:
  664.             _loc1_.sound7clip_3.stop("bagpipes");
  665.       }
  666.    }
  667.    if(_loc2_ eq "sound8")
  668.    {
  669.       _loc1_.sound8clip.stop("gong");
  670.    }
  671.    if(_loc2_ eq "sound9")
  672.    {
  673.       switch(_loc3_)
  674.       {
  675.          case 1:
  676.             _loc1_.sound9clip_1.stop("maracas");
  677.             break;
  678.          case 2:
  679.             _loc1_.sound9clip_2.stop("maracas");
  680.             break;
  681.          case 3:
  682.             _loc1_.sound9clip_3.stop("maracas");
  683.       }
  684.    }
  685.    if(_loc2_ eq "beat1")
  686.    {
  687.       switch(_loc3_)
  688.       {
  689.          case 1:
  690.             _loc1_.beat1clip_1.stop("mideast");
  691.             break;
  692.          case 2:
  693.             _loc1_.beat1clip_2.stop("mideast");
  694.             break;
  695.          case 3:
  696.             _loc1_.beat1clip_3.stop("mideast");
  697.       }
  698.    }
  699.    if(_loc2_ eq "beat2")
  700.    {
  701.       switch(_loc3_)
  702.       {
  703.          case 1:
  704.             _loc1_.beat2clip_1.stop("african");
  705.             break;
  706.          case 2:
  707.             _loc1_.beat2clip_2.stop("african");
  708.             break;
  709.          case 3:
  710.             _loc1_.beat2clip_3.stop("african");
  711.       }
  712.    }
  713.    if(_loc2_ eq "beat3")
  714.    {
  715.       switch(_loc3_)
  716.       {
  717.          case 1:
  718.             _loc1_.beat3clip_1.stop("chinese");
  719.             break;
  720.          case 2:
  721.             _loc1_.beat3clip_2.stop("chinese");
  722.             break;
  723.          case 3:
  724.             _loc1_.beat3clip_3.stop("chinese");
  725.       }
  726.    }
  727.    if(_loc2_ eq "beat4")
  728.    {
  729.       switch(_loc3_)
  730.       {
  731.          case 1:
  732.             _loc1_.beat4clip_1.stop("brazillian");
  733.             break;
  734.          case 2:
  735.             _loc1_.beat4clip_2.stop("brazillian");
  736.             break;
  737.          case 3:
  738.             _loc1_.beat4clip_3.stop("brazillian");
  739.       }
  740.    }
  741. }
  742. _root.dynamictext.gotoAndStop(_root.language);
  743. _root.GameStarted = false;
  744. _root.GamePaused = false;
  745. _root.soundtrack1playing = false;
  746. _root.soundtrack2playing = false;
  747. _root.soundtrack3playing = false;
  748. _root.demosound = "";
  749. _root.imdragging = false;
  750. _root.track1offset = 0;
  751. _root.track2offset = 0;
  752. _root.track3offset = 0;
  753.